home *** CD-ROM | disk | FTP | other *** search
/ Collection of Tools & Utilities / Collection of Tools and Utilities.iso / tex / itrns211.zip / SRC / MAKEFILE.GCC < prev    next >
Text File  |  1991-10-14  |  5KB  |  192 lines

  1. #
  2. #   Makefile for itrans $Header: e:/itrans/src/rcs/makefile.gcc 1.3 91/10/14 20:29:09 avinash Exp $
  3. #
  4. # To be used for the GNU C compiler, using DJDelorie's G++ port to the
  5. # 80x386 machines.
  6.  
  7. # change all defines as required.
  8.  
  9. #SHELL=/bin/sh   # use this defn on a unix machine
  10. SHELL=        # use this defn on a pc
  11.  
  12. ####### 
  13. # Note that a shell environment variable has to be defined, called
  14. # ITRANSPATH.
  15. # A sample value for it is:
  16. # ITRANSPATH=$(HEADERPATH):$(TFMDIR), where HEADERPATH and TFMDIR
  17. # will be defined further down in this makefile....
  18. ####### 
  19.  
  20. ####### 
  21. # If you do not have a compiler that understands new-style function
  22. # declarators, make the "noansi" object, instead of "itrans" or "all".
  23. # IMPORTANT: Also, make the variable PROTO be null.
  24. ####### 
  25.  
  26. # for SYSV (and friends which use <string.h> instead of <strings.h>)
  27. # define the c-compiler flag
  28. # (add -DMSDOS for 80x86 PC systems (IBM Compatible))
  29. SYS = -DSYSV -DMSDOS
  30.  
  31. # if your C compiler understands prototypes, define PROTO_C,
  32. # else keep PROTO null
  33. # PROTO =
  34. PROTO=-DPROTO_C=1
  35.  
  36. # where the installed binary goes
  37. # BINDIR = /usr1/avinash/ITRANS/bin
  38. BINDIR = /usr1/avinash/ITRANS/bin
  39.  
  40. # where the TFM, and IFM files go
  41. # TFMDIR = /usr/lib/tex/fonts/tfm
  42. TFMDIR=/usr1/avinash/ITRANS/lib
  43.  
  44. # where the header PS files go
  45. # HEADERDIR = /usr/lib/tex/ps
  46. HEADERDIR = /usr1/avinash/ITRANS/lib
  47.  
  48. # where the manual page goes
  49. # MANDIR = /usr/local/text/man/man1
  50. MANEXT = 1
  51. MANDIR = /usr1/avinash/ITRANS/doc
  52.  
  53. # code optimizer
  54. # either use
  55. # OPT = -O2
  56. # OPT = -g
  57. OPT =
  58.  
  59. # libraries to include (-ll -lm -lc on most systems)
  60. # Note, if you do not have lex/yacc on your system, turn off the
  61. # -ll flag. You will also need to modify the dependencies of
  62. # ilex.o and iyacc.o, check out the comments further down this file
  63. # (look for ilex.o and iyacc.o)
  64. # FLIBS= -lmalloc -ll -lm -lc # Use this for SGI machines
  65. # FLIBS= -lm -lc # Use this for machines missing lex/yacc tools
  66. # FLIBS= -lm -lc
  67. FLIBS= -lflex -lm -lc # PC related...
  68.  
  69. # C flags to use:
  70. # SGI: -acpp use ANSI C prepreocessor, -prototypes, honor prototypes.
  71. # CFLAGS = -acpp -prototypes $(OPT) $(SYS) $(PROTO)
  72. CFLAGS = $(OPT) $(SYS) $(PROTO)
  73.  
  74. CC=gcc
  75.  
  76. # Yacc flags:
  77. YFLAGS= -d
  78.  
  79. ###
  80.  
  81. SRC =    iyacc.y \
  82.     itrans.c \
  83.     ilex.l \
  84.     lang.c \
  85.     font.c \
  86.     pifm.c \
  87.     ichar.c \
  88.     itotex.c \
  89.     itops.c \
  90.     utils.c
  91.  
  92. OBJ =    iyacc.o \
  93.     itrans.o \
  94.     ilex.o \
  95.     lang.o \
  96.     font.o \
  97.     pifm.o \
  98.     ichar.o \
  99.     itotex.o \
  100.     itops.o \
  101.     utils.o
  102.  
  103. HEADERFILES = devnac.ps itrans.pro
  104. FILES = 
  105.  
  106. .c.o:
  107.     $(CC) -c $(CFLAGS) $<
  108.  
  109.  
  110. all : itrans.exe
  111.  
  112. itrans.exe : $(OBJ)
  113.     $(CC) $(OBJ) $(LIBS) $(FLIBS) -o itrans
  114.     copy /b d:\djg\bin\stub.exe+itrans itrans.exe
  115.     del itrans
  116.  
  117. $(OBJ) : itrans.h imap.h ifm.h
  118.  
  119. # .l.c:;
  120. # If you do not have lex on your system, uncomment the following
  121. # four lines (you may leave the .l.c line above as it is)
  122. # Also, comment out the ilex.c that follows this defn (the PC related stuff).
  123. # (it may already be commented....)
  124. #---
  125. # ilex.o : ilex.c ytab.h
  126. #     $(CC) -c $(CFLAGS) -DNOLEX ilex.c
  127. # ilex.c : lexyyc
  128. #     cp lexyyc ilex.c
  129.  
  130. # PC related stuff
  131. ilex.c : ilex.l
  132.     flex ilex.l
  133.     mv lexyy.c ilex.c
  134.  
  135. # .y.c:;
  136. # If you do not have yacc on your system, uncomment the following
  137. # four lines (you may leave the .y.c:; line above as it is).
  138. # Also, comment out the iyacc.c that follows this defn (the PC related stuff).
  139. # (it may already be commented....)
  140. #---
  141. # iyacc.o : iyacc.c
  142. #     $(CC) -c $(CFLAGS) iyacc.c
  143. # iyacc.c : ytabc 
  144. #     cp ytabc iyacc.c
  145.  
  146. # PC related stuff
  147. iyacc.c : iyacc.y 
  148.     bison -yd iyacc.y
  149.     mv y_tab.c iyacc.c
  150.  
  151. # When making noansi, make sure PROTO is null
  152. noansi : deansify.exe $(SRC)
  153.     $(SHELL) dodeans
  154.     touch noansi
  155.     echo "Make sure the variable PROTO <$(PROTO)> is NULL in the Makefile!"
  156.     make all
  157.  
  158. deansify.exe:    deansify.c
  159.     $(CC) $(CFLAGS) deansify.c -o deansify
  160.     copy /b d:\djg\bin\stub.exe+deansify deansify.exe
  161.     del deansify
  162.  
  163. install : all
  164.     -mkdir $(BINDIR)
  165.     -mkdir $(HEADERDIR)
  166.     -mkdir $(MANDIR)
  167.     cp itrans $(BINDIR)/itrans
  168.     cp prips $(BINDIR)/prips
  169.     -cp ../lib/itrans.pro $(HEADERDIR)
  170.     -cp ../lib/devnac.ps $(HEADERDIR)
  171.     -cp ../lib/devnac.ifm $(TFMDIR)
  172.     -cp ../lib/devnac.afm $(TFMDIR)
  173.     -cp ../lib/dnh.tfm $(TFMDIR)
  174.     -cp ../lib/dnho.tfm $(TFMDIR)
  175.     -cp ../lib/dnhrc.tfm $(TFMDIR)
  176.     -cp ../lib/dnhre.tfm $(TFMDIR)
  177.     -chmod +w $(MANDIR)/itrans.$(MANEXT)
  178.     -cp itrans.1 $(MANDIR)/itrans.$(MANEXT)
  179.     -chmod -w $(MANDIR)/itrans.$(MANEXT)
  180.     -(cd $(MANDIR); nroff -man itrans.$(MANEXT) > itrans.man)
  181.     -chmod +w $(MANDIR)/prips.$(MANEXT)
  182.     -cp prips.1 $(MANDIR)/prips.$(MANEXT)
  183.     -chmod -w $(MANDIR)/prips.$(MANEXT)
  184.     -(cd $(MANDIR); nroff -man prips.$(MANEXT) > prips.man)
  185.     @echo
  186.     @echo "****** Note: There may be error messages printed when installing,"
  187.     @echo "******       most of them will be harmless---directories already existing, or "
  188.     @echo "******       copying a file onto itself."
  189.  
  190. clean :
  191.     rm -f *.o *.log
  192.